const app = getApp();
Page({
  data: {
    StatusBar: app.globalData.StatusBar,
    CustomBar: app.globalData.CustomBar,
    index: 0,
    book_list: [{'book_id':0,'book_name':'不选择账本'}],
    date: '',
    textareaAValue: '',
    consume_type:1,
    nav:0,
    type_list: [],
    input_str:'',
    show:false,
    input_msg:'请输入',
    book_id:'', //账本id
    type_id:'', //消费类目id
    disabled:false,
  },

  onShow:function(){
    let _this = this;
    _this.getUserInfo(); //获取用户信息
  },

  //获取个人信息
  getUserInfo:function(){
    let _this = this;
    wx.showLoading({
      title: '加载中',
    })
    app._post('api/member/getUserInfo', {}, function(result) {
      wx.hideLoading({})
      if(result.code == 200){
        _this.setData({
          is_login:true,
        })
      }else{
        wx.navigateTo({
          url: '../auth/auth'
        })
      }
    });
  },
})